//
//  HPUserBuilder.m
//  LockTest
//
//  Created by ZhangBo on 2018/12/2.
//  Copyright © 2018 ZhangBo. All rights reserved.
//

#import "HPUserBuilder.h"

@implementation HPUserBuilder

// build方法的实现
- (HPUser *)build {
    return [[HPUser alloc] initWithBuilder:self];
}

// HPUserBilder初始化器
- (instancetype)initWithUser:(HPUser *)user {
    if (self = [super init]) {
        self.userId = user.userId;
        self.firstName = user.firstName;
        self.lastName = user.lastName;
        self.gender = user.gender;
        self.dateOfBirth = user.dateOfBirth;
        self.albums = user.albums;
    }
    return self;
}

@end
